
Partial Class Store_ShoppingCart
    Inherits System.Web.UI.Page


    Protected Sub GridView1_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GridView1.RowDeleting
        Dim ASIN As String = GridView1.DataKeys(0).Item(0)
        Me.Profile.ShoppingCart.DeleteProduct(ASIN)
        GridView1.DataBind()
        e.Cancel = True
    End Sub

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        LinkButton1.PostBackUrl() = Me.Profile.ShoppingCart.PurchaseURL

    End Sub

    Protected Sub LinkButton2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LinkButton2.Click
        Me.Profile.ShoppingCart.Clear()
        GridView1.DataBind()

    End Sub

    Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LinkButton1.Click
        Me.Profile.ShoppingCart.Clear()

    End Sub
End Class
